import 'dart:convert';

import 'package:star_author/generated/json/base/json_field.dart';
import 'package:star_author/generated/json/wallet_particular_list_item_entity.g.dart';

@JsonSerializable()
class WalletParticularListItemEntity {
  double? id;
  @JSONField(name: "detailable_type")
  String? detailableType;
  @JSONField(name: "detailable_id")
  double? detailableId;
  @JSONField(name: "created_at")
  String? createdAt;
  String? price;
  @JSONField(name: "is_klone")
  bool? isKlone;
  String? process;

  WalletParticularListItemEntity();

  factory WalletParticularListItemEntity.fromJson(Map<String, dynamic> json) =>
      $WalletParticularListItemEntityFromJson(json);

  Map<String, dynamic> toJson() => $WalletParticularListItemEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  static fromJsonList(List jsonRes) {
    return jsonRes
        .map((e) => WalletParticularListItemEntity.fromJson(e))
        .toList();
  }
}
